-- GENERATED SPELL FOR [Tabetha] --


function spell0_6546(pUnit, Event) --@Create Rift,Self--
pUnit:FullCastSpellOnTarget(9079,pUnit)
pUnit:RegisterEvent('Sorts_6546', 3000, 1)
end

function spell1_6546(pUnit, Event) --@Summon Demon of the Orb,Self--
pUnit:FullCastSpellOnTarget(9097,pUnit)
pUnit:RegisterEvent('Sorts_6546', 5000, 1)
end

function Sorts_6546(pUnit, Event)
local choix_sorts_6546 = math.random(0, 1)
if choix_sorts_6546 == 0 then
pUnit:RegisterEvent('spell0_6546', 1, 1)
end
if choix_sorts_6546 == 1 then
pUnit:RegisterEvent('spell1_6546', 1, 1)
end
end

function mob6546_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6546', math.random(1500, 3000), 1)
end

function mob6546_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6546_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6546_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6546, 1, 'mob6546_Action')
RegisterUnitEvent(6546, 2, 'mob6546_Leave')
RegisterUnitEvent(6546, 3, 'mob6546_Kill')
RegisterUnitEvent(6546, 4, 'mob6546_Die')
